package cn.bdqn.hospital.dao;

import cn.bdqn.hospital.entity.Employees;

import java.sql.SQLException;

public interface EmployeesDao {
    /**
     * 新增员工
     * @param employees
     * @return
     * @throws SQLException
     */
    public int add(Employees employees) throws SQLException;

    /**
     * 修改员工
     * @param employees
     * @return
     * @throws SQLException
     */
    public int update(Employees employees) throws SQLException;

    /**
     * 通过员工id删除员工
     * @param ygid
     * @return
     * @throws SQLException
     */
    public int deleteByYgid(Integer ygid) throws SQLException;

    /**
     * 通过员工姓名删除员工
     * @param ygName
     * @return
     * @throws SQLException
     */
    public int deleteByYgName(String ygName) throws SQLException;

    /**
     * 通过员工账号删除员工
     * @param ygAccount
     * @return
     * @throws SQLException
     */
    public int deleteByYgAccount(String ygAccount) throws SQLException;

    /**
     * 通过员工id查询员工
     * @param ygid
     * @return
     * @throws SQLException
     */
    public Employees findEmployeesById(Integer ygid) throws SQLException;

    /**
     * 通过员工账号查询员工
     * @param ygAccount
     * @return
     * @throws SQLException
     */
    public Employees findEmployeesByAccount(String ygAccount) throws SQLException;

    /**
     * 通过员工手机号查询员工
     * @param ygPhone
     * @return
     * @throws SQLException
     */
    public Employees findEmployeesByPhone(String ygPhone) throws SQLException;

    /**
     * 通过科室查询员工
     * @param roleId
     * @return
     * @throws SQLException
     */
    public Employees findEmployeesByRoleId(String roleId) throws SQLException;
}

